Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

wonka

Package Overview
Dependencies
Maintainers
1
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wonka

A tiny but capable push & pull stream library for TypeScript and Flow

  • 6.3.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created

What is wonka?

The wonka package is a lightweight but powerful stream library for TypeScript and JavaScript. It allows for the creation, manipulation, and consumption of streams of values over time. It's particularly useful for handling asynchronous operations and events in a functional reactive programming style.

What are wonka's main functionalities?

Creating streams

This feature allows for the creation of streams from various sources. In this example, a stream is created from an array.

import { fromArray } from 'wonka';
const stream = fromArray([1, 2, 3]);

Transforming streams

This feature demonstrates how to transform streams using operators like `map`. In the example, each value in the stream is doubled.

import { fromArray, map } from 'wonka';
const stream = fromArray([1, 2, 3]);
const doubled = map(x => x * 2)(stream);

Consuming streams

This feature shows how to consume streams. The `forEach` operator is used to log each value from the stream to the console.

import { fromArray, forEach } from 'wonka';
const stream = fromArray([1, 2, 3]);
forEach(x => console.log(x))(stream);

Other packages similar to wonka

Keywords

FAQs

Package last updated on 03 Aug 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc